/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package orm;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class Tbv_comunaDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression co_id_comuna;
	public final StringExpression co_comuna;
	
	public Tbv_comunaDetachedCriteria() {
		super(orm.Tbv_comuna.class, orm.Tbv_comunaCriteria.class);
		co_id_comuna = new IntegerExpression("co_id_comuna", this.getDetachedCriteria());
		co_comuna = new StringExpression("co_comuna", this.getDetachedCriteria());
	}
	
	public Tbv_comunaDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, orm.Tbv_comunaCriteria.class);
		co_id_comuna = new IntegerExpression("co_id_comuna", this.getDetachedCriteria());
		co_comuna = new StringExpression("co_comuna", this.getDetachedCriteria());
	}
	
	public Tbv_provinciaDetachedCriteria createTbv_provinciapr_id_provinciaCriteria() {
		return new Tbv_provinciaDetachedCriteria(createCriteria("tbv_provinciapr_id_provincia"));
	}
	
	public Tbv_maquinaDetachedCriteria createTbv_maquinaCriteria() {
		return new Tbv_maquinaDetachedCriteria(createCriteria("ORM_Tbv_maquina"));
	}
	
	public Tbv_comuna uniqueTbv_comuna(PersistentSession session) {
		return (Tbv_comuna) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Tbv_comuna[] listTbv_comuna(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Tbv_comuna[]) list.toArray(new Tbv_comuna[list.size()]);
	}
}

